<?php

namespace UC_PHP\FileSystem;

if (!defined('UC_FILESYSTEM_ROOT')) 
{
    define('UC_FILESYSTEM_ROOT', dirname(__FILE__) . '/');
    require_once UC_FILESYSTEM_ROOT . 'Autoloader.php';
}

class Folders extends TypedCollection
{
    public function __construct($parent_folder_path = '')
    {
        parent::__construct('Folder');
        $this->parent_folder_path = $parent_folder_path;
    }

    public function add_folder($folder_name = 'new_directory')
    {
        $folder = FileSystem::create_folder(
            $this->parent_folder_path . '/' . $folder_name);
        $this->add($folder);
    }

    private $parent_folder_path = '';
}
